package com.woniuxy.mapper;

import com.work.framework.pojo.GoodsAuctionDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author fengyao
 * @version 1.0
 * @date 2019/9/26 0026 上午 11:31
 */
@Repository
@Mapper
public interface GoodsAuditMapper {
    /**
     * 查看待审核商品信息
     * @return
     */
    @Select("select * from auction a inner join goods g on a.gid=g.gid and a.valid=1 inner join picture p on p.gid=g.gid and p.status=0  where a.status=0")
    List<GoodsAuctionDTO> selectGoodsAuditList();

    /**
     * 查询所有商品
     * @return
     */
    @Select("select * from auction a inner join goods g on a.gid=g.gid and a.valid=1 inner join picture p on p.gid=g.gid and p.status=0")
    List<GoodsAuctionDTO> selectGoods();
}
